package com.woniuxy.main.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.woniuxy.main.pojo.Vi_user_coach;
import com.woniuxy.main.pojo.Vi_user_gym;

public interface Vi_user_gymMapper {

	// 查询所有场馆
	@Select("select * from vi_user_gym")
	public List<Vi_user_gym> all();
	
	// 根据uid查询场馆
	@Select("select * from vi_user_gym where uid = #{uid}")
	public Vi_user_gym findGymByUid(int uid);
	
	public List<Vi_user_gym> findGymByGname(@Param("gname")String gname);
	
	//分页查询所有会馆信息，一页显示8个
	@Select("select * from vi_user_gym order by uid limit #{page},8")
	public List<Vi_user_gym> showGymList(int page);
			
	//查询总数
	@Select("select COUNT(*) from vi_user_gym")
	public int totalPage();
}
